<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<script type="text/javascript">
	$(function() {
		var $grid = $('#grig_participant');
		var $title = '学生活动报名';
		var $baseUrl = 'teaching/participant';
		$grid.datagrid({
			title : $title + '列表',
			url : $baseUrl + '/page?sort=enroll.name,asc',
			idField : 'id',
			fitColumns:true,
			striped : true,
			pagination : true,
			pageSize : 50,
			pageList : [ 50, 100, 200 ],
			dialog : {
				url : $baseUrl,
				name : $title,
				search : {
					width : 500,
					height : 320,
					name : '查询',
					url : 'search',
					buttons : [ $.dialog.buttons.search,$.dialog.buttons.close ]
				},
				create : {
					width : 500,
					height : 420
				},
				update : {
					width : 500,
					height : 420
				}
			},
			columns : [ [ {
				field : 'id',
				title : '编号',
				width : 250,
				hidden : true
			} ,{
				field : 'banji',
				title : '班级',
				width : '200',
				formatter:function(value,row){
					return row.student==undefined?'':row.student.banji.name;
				}
			}, {
				field : 'student',
				title : '姓名',
				width : 200,
				formatter:function(value,row){
					return value==undefined?'':value.name;
				}
			},{
				field : 'enroll',
				title : '报名项目',
				width : 200,
				formatter : function(value,row){
					return value==undefined?'':value.name;
				}
			},{
				field : 'cost',
				title : '报名费(元)',
				width : 200
			},{
				field : 'creator',
				title : '经手人',
				width : 200,
				formatter : function(value,row){
					return value==undefined?'':value.name;
				}
			},{
				field:'createTime',
				title:'报名时间',
				width:200
			},{
				field : 'comment',
				title : '说明',
				width : 600
			} ] ],
			toolbar : [$.crudgrid.buttons.create,$.crudgrid.buttons.update,$.crudgrid.buttons.remove, $.crudgrid.buttons.search,'-',$.crudgrid.buttons.clearSearch, '-', $.crudgrid.buttons.refresh,'-' ]
		});

	});
</script>
<table id="grig_participant">

</table>